﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Text.Json.Serialization;

namespace Ec.NETCoreFramework.Common.Core
{
    /// <summary>
    /// 返回抽象
    /// </summary>
    public interface IResponse
    {
        /// <summary>
        ///返回码，0为正常
        ///EnumUnifiedPayOrderReturnCode
        /// </summary>
        public string Code { get; }
        /// <summary>
        /// 
        /// </summary>
        public string Message { get; }
        /// <summary>
        /// /错误描述
        /// </summary>
        public string ErrDetail { get; }
        /// <summary>
        /// 是否成功，内部使用
        /// </summary>
        [JsonIgnore]
        public bool Success { get; set; }
    }
    /// <summary>
    /// 支付模块返回信息泛型
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public interface IResponse<T> : IResponse
    {
        /// <summary>
        /// 内容
        /// </summary>
        public T Content { get; }
    }
}
